'''
name:YuFuXiao
date : 2018-1-xx
QQ:2573179560
***utf-8***
'''

from sqlalchemy import Column, Integer, Boolean, ForeignKey, String
from sqlalchemy.orm import relationship

from app.models.base import Base


class Wish(Base):
    id = Column(Integer, primary_key=True)
    user = relationship('User')
    uid = Column(Integer, ForeignKey('user.id'))  # 如果上面的属性user是user1那么这里应该写成 user1.id
    isbn = Column(String(15), nullable=False)
    launched = Column(Boolean, default=False)  #是否送出
